<?
header('Content-type: text/html;charset=utf-8');
include('db_info.php');

	
	
	$sql="select * from orders where tel1<>'' order by create_time desc";
	if(!$result = $GLOBALS['mysqli_conn1']->query($sql))
	{
		echo "<br>".$sql;
		exit();
	};
	
	echo "<table border=1><tr><td>Время</td><td>id заказа</td><td>Телефон(ФИО)</td><td width='150px'>Сообщение</td><td>Инфа по машине</td><td>Водители</td><td>По страховке</td></tr>";
	
	while ($row = mysqli_fetch_array($result))
	{
		echo "<tr><td>".date("Ymd H:i",$row['create_time'])."</td><td>".$row['order_id']."</td><td>".$row['tel1']."(".$row['fio'].")</td><td>".$row['message']."</td><td>".$row['manufacturerName']." ".$row['carName']." ".$row['carAge']." ".$row['carPrice']."руб ".$row['power']."</td><td>".$row['drivers']."</td><td>".$row['skName']." ".$row['realCost']."</td></tr>";
	};
	
	
	echo "</table>";
	
?>